package beans;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * Bill(帳單資訊)
 */
@Entity
@Table(name = "bills")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
//public class Bill extends AbstractSecureObject implements Serializable {
public class Bill implements Serializable {

    /**
	 * 
	 */
	private static final long serialVersionUID = 6682287387611624444L;

	@Id
    @GeneratedValue
    private Integer id;
    
	@Column(name = "REC_CODE", length = 255, nullable = false)        
    private String REC_CODE;
    
    @Column(name = "INSU_NO", length = 10)
    private String INSU_NO;
 
    ////@Column(name = "PAAB_DATE", length = 64)
    ////private String PAAB_DATE;
    //@Temporal(TemporalType.TIMESTAMP)    
    //@Column(name = "PAAB_DATE")
    //private Date PAAB_DATE;
    @Column(name = "PAAB_DATE", length = 128)
    private String PAAB_DATE;
 
    @Column(name = "WAIT", length = 128)
    private String WAIT;

    @Column(name = "GROUP_NUMB", length = 20)
    private String GROUP_NUMB;
   
    @Column(name = "MAN", length = 20)
    private String MAN;

    //@Column(name = "dont_call", nullable = false)
    //private boolean dontCall=false;
    
    @Column(name = "TMS1", length = 20)
    private String TMS1;

    //@Temporal(TemporalType.TIMESTAMP)    
    //@Column(name = "birthday")
    //private Date birthday;
    @Column(name = "RCP_CODE", length = 20)
    private String RCP_CODE;
 
    //@Temporal(TemporalType.TIMESTAMP)    
    //@Column(name = "delta_ts", nullable = false)
    //private Date deltaTime;
    @Column(name = "INSU_YEAR", length = 4)
    private String INSU_YEAR;
    
    @Column(name = "TMS", length = 4)
    private String TMS;
    
    @Column(name = "PREM", length = 50)
    private String PREM;
    
    @Column(name = "BON_DEDU", length = 50)
    private String BON_DEDU;
    
    @Column(name = "GP_DEDU", length = 50)
    private String GP_DEDU;
    
    @Column(name = "TR_DEDU", length = 50)
    private String TR_DEDU;
    
    @Column(name = "INT", length = 50)
    private String INT;
    
    //@Column(name = "PAAB_AMT", nullable = false)
    //private int PAAB_AMT;
    @Column(name = "PAAB_AMT", nullable = false)
    private String PAAB_AMT;

    //@Temporal(TemporalType.TIMESTAMP)    
    //@Column(name = "PAID_DATE")
    //private Date PAID_DATE;
    @Column(name = "PAID_DATE", length = 50)
    private String PAID_DATE;
    
    @Column(name = "CHAR_AT", length = 50)
    private String CHAR_AT;
    
    @Column(name = "COMP_ID", length = 50)
    private String COMP_ID;
    
    @Column(name = "NT1", length = 50)
    private String NT1;
    
    @Column(name = "BAR_INFO", length = 50)
    private String BAR_INFO;
    
    @Column(name = "BANK_CODE", length = 50)
    private String BANK_CODE;
    
    @Column(name = "BANK_NAME", length = 50)
    private String BANK_NAME;
    
    // 要保人姓名
    @Column(name = "LIPM_NAME", length = 50)
    private String LIPM_NAME;
    
    // 被保人姓名
    @Column(name = "LIPI_NAME", length = 50)
    private String LIPI_NAME;
    
    // 大字串
    //@Column(name = "notes" , length = 4000)
    //private String notes;

    // 多對1
    //@ManyToOne(targetEntity = User.class)
    //@JoinColumn(name = "mapped_user_id")
    //private User mappedUser;
    
    //@ManyToOne(targetEntity = User.class)
    //@JoinColumn(name = "assigned_user_id")
    //private User assignedUser;    
    
    @Temporal(TemporalType.TIMESTAMP)    
    @Column(name = "ctime")    
    private Date ctime;
    
    //@ManyToOne(targetEntity = CustomerSource.class)
    //@JoinColumn(name = "customer_source_id")
    //private CustomerSource customerSource;

    /**
     * No-arg constructor for JavaBean tools
     */
    public Bill() {}
    
    /**
     * Full constructor
     */
//     public Bill(String name,String phoneMobile,Date creationTime,CustomerSource customerSource) {
//         this.name = name;
//         this.phoneMobile = phoneMobile;
//         this.creationTime = creationTime;
//         this.deltaTime = creationTime;
//         this.birthday = creationTime;
//         this.customerSource = customerSource;        
//     }
    
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Accessor Methods ~~~~~~~~~~~~~~~~~~~~~~~~~~//     

    public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getREC_CODE() {
		return REC_CODE;
	}

	public void setREC_CODE(String rec_code) {
		REC_CODE = rec_code;
	}

	public String getINSU_NO() {
		return INSU_NO;
	}

	public void setINSU_NO(String insu_no) {
		INSU_NO = insu_no;
	}

//	public Date getPAAB_DATE() {
//		return PAAB_DATE;
//	}
//
//	public void setPAAB_DATE(Date paab_date) {
//		PAAB_DATE = paab_date;
//	}
	public String getPAAB_DATE() {
		return PAAB_DATE;
	}

	public void setPAAB_DATE(String paab_date) {
		PAAB_DATE = paab_date;
	}

	public String getWAIT() {
		return WAIT;
	}

	public void setWAIT(String wait) {
		WAIT = wait;
	}

	public String getGROUP_NUMB() {
		return GROUP_NUMB;
	}

	public void setGROUP_NUMB(String group_numb) {
		GROUP_NUMB = group_numb;
	}

	public String getMAN() {
		return MAN;
	}

	public void setMAN(String man) {
		MAN = man;
	}

	public String getTMS1() {
		return TMS1;
	}

	public void setTMS1(String tms1) {
		TMS1 = tms1;
	}

	public String getRCP_CODE() {
		return RCP_CODE;
	}

	public void setRCP_CODE(String rcp_code) {
		RCP_CODE = rcp_code;
	}

	public String getINSU_YEAR() {
		return INSU_YEAR;
	}

	public void setINSU_YEAR(String insu_year) {
		INSU_YEAR = insu_year;
	}

	public String getTMS() {
		return TMS;
	}

	public void setTMS(String tms) {
		TMS = tms;
	}

	public String getPREM() {
		return PREM;
	}

	public void setPREM(String prem) {
		PREM = prem;
	}

	public String getBON_DEDU() {
		return BON_DEDU;
	}

	public void setBON_DEDU(String bon_dedu) {
		BON_DEDU = bon_dedu;
	}

	public String getGP_DEDU() {
		return GP_DEDU;
	}

	public void setGP_DEDU(String gp_dedu) {
		GP_DEDU = gp_dedu;
	}

	public String getTR_DEDU() {
		return TR_DEDU;
	}

	public void setTR_DEDU(String tr_dedu) {
		TR_DEDU = tr_dedu;
	}

	public String getINT() {
		return INT;
	}

	public void setINT(String int1) {
		INT = int1;
	}

	//public int getPAAB_AMT() {
	//	return PAAB_AMT;
	//}

	//public void setPAAB_AMT(int paab_amt) {
	//	PAAB_AMT = paab_amt;
	//}
  public String getPAAB_AMT() {
		return PAAB_AMT;
	}

	public void setPAAB_AMT(String paab_amt) {
		PAAB_AMT = paab_amt;
	}

//	public Date getPAID_DATE() {
//		return PAID_DATE;
//	}
//
//	public void setPAID_DATE(Date paid_date) {
//		PAID_DATE = paid_date;
//	}
	public String getPAID_DATE() {
		return PAID_DATE;
	}

	public void setPAID_DATE(String paid_date) {
		PAID_DATE = paid_date;
	}

	public String getCHAR_AT() {
		return CHAR_AT;
	}

	public void setCHAR_AT(String char_at) {
		CHAR_AT = char_at;
	}

	public String getCOMP_ID() {
		return COMP_ID;
	}

	public void setCOMP_ID(String comp_id) {
		COMP_ID = comp_id;
	}

	public String getNT1() {
		return NT1;
	}

	public void setNT1(String nt1) {
		NT1 = nt1;
	}

	public String getBAR_INFO() {
		return BAR_INFO;
	}

	public void setBAR_INFO(String bar_info) {
		BAR_INFO = bar_info;
	}

	public String getBANK_CODE() {
		return BANK_CODE;
	}

	public void setBANK_CODE(String bank_code) {
		BANK_CODE = bank_code;
	}

	public String getBANK_NAME() {
		return BANK_NAME;
	}

	public void setBANK_NAME(String bank_name) {
		BANK_NAME = bank_name;
	}

	public String getLIPM_NAME() {
		return LIPM_NAME;
	}

	public void setLIPM_NAME(String lipm_name) {
		LIPM_NAME = lipm_name;
	}

	public String getLIPI_NAME() {
		return LIPI_NAME;
	}

	public void setLIPI_NAME(String lipi_name) {
		LIPI_NAME = lipi_name;
	}

	public Date getCtime() {
		return ctime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

}
